package ltd.newbee.cloud.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Auther: tangyushan
 * @Date: 2024/5/24 - 05 - 24 - 19:06
 * @Description: ltd.newbee.cloud.api
 * @version: 1.0
 */
@RestController
public class ConsumerTestController {

    @Autowired
    RestTemplate restTemplate;

    private final String SERVICE_URL = "http://newbee-cloud-goods-service";

    @GetMapping("/consumerTest")
    public String consumerTest(){
        return restTemplate.getForObject(SERVICE_URL + "/goodsServiceTest", String.class);
    }

    @GetMapping("nacosRegTest")
    public String nacosRegTest(){
        return "nacosRegTest";
    }


}
